<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>域表信息表</title>
    <script type="text/javascript" src="/public/common.js"></script>
    <script type="text/javascript" src="/public/sose/js/checkViewPermissions.js"></script>
</head>

<body>
<div class="layout-body" id="eecstate" v-cloak>
    <layout-header></layout-header>
    <div id="wrap">
        <layout-sider></layout-sider>
        <div class="layout-main">
            <!-- 多条件查询 -->
            <div class="qry">
                <div class="first">
                    <div class="juinline">
                        表名:
                        <el-input class="select_input" v-model.trim="sEecstate.tableName"
                                  type="text" clearable></el-input>
                        列名:
                        <el-input class="select_input" v-model.trim="sEecstate.colmName"
                                  type="text" clearable></el-input>
                    </div>
                    <div class="butRight">
                        <i-button type="primary" icon="ios-search" @click="filter">搜索
                        </i-button>
                        <i-button @click="clearSEecstate">清空</i-button>
                    </div>
                </div>
                <div class="butLeft">
                    <i-button type="primary" @click="addEecstateModal = true">新增域表信息</i-button>
                    <i-button @click="openRemoveEecstateSelectModal">删除</i-button>
                </div>

            </div>
            <div>
                <!-- 表格 -->
                <i-table class="table" border size='small' :columns="column"
                         :data="nowData" :loading="loading" highlight-row="true"
                         @on-selection-change="onSelectionChange">
                    <template slot-scope="{ row, index }" slot="action">
                        <a class="table-a" @click="openEditEecstateModal(index)"> 编辑 </a>
                        <a type="error" size="small" @click="openRemoveEecstate(index)">删除</a>
                    </template>
                </i-table>

                <div class="div-inline-left">
						<span v-show="selection.length >0">已勾选 {{selection.length}}
							条</span>
                </div>

                <!-- 分页 -->
                <div class="div-inline-right">
                    <Page :current="pageNum" :total="totalNum" :page-size="pageSize"
                          @on-change="onPageChange" @on-page-size-change="onPageSizeChange"
                          show-total show-elevator show-sizer></Page>
                </div>
            </div>
        </div>

        <!-- 新增模态框 -->
        <Modal v-model="addEecstateModal" :mask-closable="false"
               @on-cancel="cancelAddEecstate">
            <p slot="header">
                <span>新增域表信息</span>
            </p>
            <center>
                <table>
                    <tr>
                        <td>表:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.table"
                                      type="text" placeholder="请输入0~20个字符"></el-input>
                        </td>
                    </tr>

                    <tr>
                        <td>表名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.tableName"
                                      type="text" placeholder="请输入0~20个字符"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>列:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.colm"
                                      type="text" placeholder="请输入0~50个字符"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>列名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.colmName"
                                      type="text" placeholder="请输入0~20个字符"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>编码:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.code"
                                      type="text" placeholder="请输入0~20个字符"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>编码名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.codeName"
                                      type="text" placeholder="请输入0~50个字符"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>序号:</td>
                        <td>
                            <el-input-number class="input" v-model="eecstate.seq"
                                             :precision="0" :max="100" :min="0" :step="1"
                                             size="large"></el-input-number>
                        </td>

                    </tr>
                    <tr>
                        <td>备注:</td>
                        <td>
                            <el-input class="input" type="textarea"
                                      v-model.trim="eecstate.remark" maxlength="2000"
                                      :autosize="{minRows: 2,maxRows: 4}" show-word-limit></el-input>
                        </td>
                    </tr>
                </table>
            </center>
            <div slot="footer">
                <i-button type="text" size="large" @click="cancelAddEecstate">取消</i-button>
                <i-button type="primary" size="large" @click="addEecstate">确定</i-button>
            </div>
        </Modal>

        <!-- 编辑模态框 -->
        <Modal v-model="editEecstateModal" :mask-closable="false"
               @on-cancel="cancelEditEecstate">
            <p slot="header">
                <span>编辑域表信息</span>
            </p>
            <center>
                <table>
                    <tr>
                        <td>表（不可更改）:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.table"
                                      type="text" readonly=""></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>表名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.tableName"
                                      type="text"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>列（不可更改）:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.colm"
                                      type="text" readonly=""></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>列名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.colmName"
                                      type="text"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>编码（不可更改）:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.code"
                                      type="text" readonly=""></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>编码名:</td>
                        <td>
                            <el-input class="input" v-model.trim="eecstate.codeName"
                                      type="text"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>序号:</td>
                        <td>
                            <el-input-number class="input" v-model="eecstate.seq"
                                             :precision="0" :max="100" :min="0" :step="1"
                                             size="large"></el-input-number>
                        </td>
                    </tr>
                    <tr>
                        <td>备注:</td>
                        <td>
                            <el-input class="input" type="textarea"
                                      v-model.trim="eecstate.remark" maxlength="2000"
                                      :autosize="{minRows: 2,maxRows: 4}" show-word-limit></el-input>
                        </td>
                    </tr>
                </table>
            </center>
            <div slot="footer">
                <i-button type="text" size="large" @click="cancelEditEecstate">取消</i-button>
                <i-button type="primary" size="large" @click="editEecstate">确定</i-button>
            </div>
        </Modal>

        <!-- 删除模态框 -->
        <Modal v-model="removeEecstateModal" title="删除域表信息"
               @on-ok="removeEecstate">
            <p>确定删除该域表信息？删除后原有内容将不再进行保存</p>
        </Modal>
        <!-- 批量删除模态框 -->
        <Modal v-model="removeEecstateSelectModal" title="批量删除域表信息"
               @on-ok="removeEecstateSelect">
            <p>确定删除当前 {{selection.length}} 条域表信息？删除后原有内容将不再进行保存</p>
        </Modal>
    </div>
    <div style="clear: both"></div>
    <layout-footer></layout-footer>
</div>
<script type="text/javascript" src="/templates/config/js/eecstate.js"></script>
</body>
</html>
